package day15.并发工具类CountDownLatch;

import java.util.concurrent.CountDownLatch;

public class MyCountDownLatchDemo {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(3);
        MotherThread motherThread = new MotherThread(countDownLatch);
        motherThread.start();
        ChileThread1 t1 = new ChileThread1(countDownLatch);
        t1.setName("小明");
        ChileThread2 t2 = new ChileThread2(countDownLatch);
        t2.setName("小红");
        ChileThread3 t3 = new ChileThread3(countDownLatch);
        t3.setName("小刚");

        t1.start();
        t2.start();
        t3.start();
    }
}
